public class Demo05 {
    public static void main(String[] args) {
        /**
         * 10！
         */
        int num = 10;
        int jc = 1;
        int sum = 0;
        int i = 1;
        while(i<=num){
            jc = jc*i;
            System.out.println(i+"阶乘为："+jc);
            i++;
            sum +=jc;
        }
        System.out.println("10的阶乘为："+jc);
        System.out.println("阶乘的和为"+sum);
    }
}
